fix(landing): revert unoptimized removal, compress source images instead#5528
Conversation
…nstead PR #5522 removed `unoptimized` from local blog/library/integration cover images, expecting next/image's runtime optimizer to serve resized AVIF/WebP. On staging, images broke entirely on /blog - the runtime optimizer is failing there (root cause still under investigation: _next/image requests aren't captured by the app's structured logger, so the underlying error wasn't visible in application logs). Reverting `unoptimized` immediately restores working images. In its place, this compresses the actual source files (mozjpeg quality 82 for JPEGs, palette PNG for PNGs) at their EXACT existing pixel dimensions - verified programmatically per-file (dimension mismatch aborts the write) and spot-checked visually. This gets the same bandwidth/LCP win the runtime optimizer was meant to provide, without depending on it: - 13 blog/library cover images + 3 author avatars + 1 brand logo - ~1.72MB -> ~1.02MB combined (~41% smaller), zero resolution change
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview This reverses the prior removal that relied on the Next.js image optimizer on staging, where those optimized requests were failing and cover images broke. Static assets are expected to be kept lean at source (per the PR description’s recompression work) rather than depending on runtime optimization for these paths. Reviewed by Cursor Bugbot for commit 401d66b. Configure here. |
Greptile SummaryThis PR restores direct serving for landing-page images and recompresses the source assets. The main changes are:
Confidence Score: 5/5This looks safe to merge.
apps/sim/public/authors/sid.jpg Important Files Changed
|
|
Re: Greptile's EXIF orientation concern on |
Summary
unoptimizedfrom local blog/library/integration cover images, expecting next/image's runtime optimizer to serve resized AVIF/WebP. That optimizer is failing on staging (root cause still under investigation —/_next/imagerequests don't go through the app's structured logger, so nothing showed up in application logs). Revertedunoptimizedon all 7 spots immediately.Type of Change
Testing
tsc --noEmitclean,biome checkcleanChecklist